home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3871 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.7 KB  |  48 lines

  1. Newsgroups: comp.lang.c
  2. Path: mxsld2.pd.infn.it!LORETI
  3. From: loreti@mxsld2.pd.infn.it (Maurizio Loreti)
  4. Subject: Re: Printing to LPT1 Printer from within program
  5. X-Nntp-Posting-Host: mxsld2.pd.infn.it
  6. Message-ID: <DM23uK.7u0@news.cern.ch>
  7. Sender: news@news.cern.ch (USENET News System)
  8. Reply-To: loreti@mxsld2.pd.infn.it
  9. Organization: I.N.F.N. Padova - CDF/CMS VAXcluster
  10. References: <4e5ee9$m28_001@pr.mcs.net>,<31076D63.289D@cmt.lpr.mail.carel.fi>
  11. Date: Wed, 31 Jan 1996 17:42:18 GMT
  12.  
  13. In article <31076D63.289D@cmt.lpr.mail.carel.fi>, Ari Lukumies <aril@cmt.lpr.mail.carel.fi> writes:
  14. >Michael D. Perry wrote:
  15. >> 
  16. >> I have just started taking a C programming class and am using Borland
  17. >> C++ v4.0 at home.  Both my teacher and I are stumped as to how to
  18. >> print to a LPT (Line Printer) device from within the program.
  19. >> 
  20. >> I have read the FAQ and there are some references to this but not
  21. >> enough that I can quite figure it out.  As near as I can figure you
  22. >> can use iostreams or fprintf() with the later appearing to be the
  23. >> simpler of the two.  With that, from what I have seen, one uses a
  24. >> filename of stdprn but I get an error message when compiling.  My
  25. >> guess is that there is a header file or a definition/declaration
  26. >> statement that needs to be referenced.
  27. >> [rest snipped]
  28. >
  29. >Have you tried:
  30. >
  31. >    #include    <stdio.h>
  32. >
  33. >    int    main(int argc, char **argv)
  34. >    {
  35. >        while (argc--)
  36. >            fprintf(stderr, "%s\n", *argv++);
  37. >    }
  38. >
  39. >Later,
  40. >AriL
  41. >-- 
  42. >All my opinions are mine and mine alone.
  43.  
  44. I hardly can see how _that_ prints on the line printer...
  45. --
  46. Maurizio Loreti                       http://mvxpd5.pd.infn.it/wwwcdf/mlo.html
  47. Un. of Padova, Dept. of Physics - Padova, Italy          loreti@padova.infn.it
  48.